<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<link rel="shortcut icon" type="image/x-icon" href="<?php echo base_url()?>external_folder/img/home/ksa_icon.png">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>باب رزق</title>
    
    
	<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>external_folder/css/styles.css" />
    
    <script type="text/javascript" src="<?php echo base_url()?>external_folder/js/home/jquery-1.5.1.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>external_folder/js/home/jquery-ui-1.8.13.custom.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>external_folder/js/home/functions.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>external_folder/js/gmap.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>external_folder/js/ui/jquery.ui.dialog.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>external_folder/js/ui/jquery.ui.widget.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/qunit.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/external/jquery.bgiframe-2.1.2.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/ui/jquery.ui.core.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/ui/jquery.ui.mouse.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/ui/jquery.ui.button.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/ui/jquery.ui.draggable.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/ui/jquery.ui.position.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/ui/jquery.ui.resizable.js"></script>
	<script src="<?php echo base_url()?>external_folder/js/ui/jquery.effects.core.js"></script>
	<link rel="stylesheet" href="<?php echo base_url()?>external_folder/js/themes/base/jquery.ui.all.css">
	
    <!-- PNG FIX for IE6 -->
    <!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
    <!--[if lte IE 6]>
        <script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
    <![endif]-->
    <script src="<?php echo base_url()?>external_folder/js/home/slide.js" type="text/javascript"></script>
	
	<style type="text/css">

	.searchText
	{
		opacity: 0.6;
		-webkit-box-shadow: 0 -1px 0 rgba(0, 0, 0, .4),inset 0 1px 2px rgba(0, 0, 0, .7);
		-moz-box-shadow: 0 -1px 0 rgba(0, 0, 0, .4),inset 0 1px 2px rgba(0, 0, 0, .6);
		box-shadow: 0 -1px 0 rgba(0, 0, 0, .4),inset 0 1px 2px rgba(0, 0, 0, .1);
		-webkit-rtl-ordering: logical;
		-webkit-user-select: text;
		cursor: auto;
		letter-spacing: normal;
		word-spacing: normal;
		line-height: normal;
		text-transform: none;
		text-indent: 0px;
		text-shadow: none;
		display: inline-block;
		text-align: -webkit-auto;
		-webkit-transition: opacity 1s;
		-moz-transition: opacity 1s;
		-o-transition: opacity 1s;
		-moz-border-radius: 40px;
		-webkit-border-radius: 40px;
		border-radius: 40px;
		padding-left: 50px;
		width: 500px;
		height: 35px;
		background: rgba(255, 255, 255, 0.99);
		font: 15px "Helvetica Neue",Arial,sans-serif;
		border: 1px solid rgba(0, 0, 0, 0.2);
		outline: none;
		top:400px;
		margin-left:125px;
		text-align:center;
		color: green;
		font-family:Tahoma, Helvetica, sans-serif;
		
	}
	input::-webkit-input-placeholder,input:-moz-placeholder
	{
		
		color:gray;
		font-family:Tahoma, Helvetica, sans-serif;
	}
	#tags
	{
		
		font-family:Tahoma, Helvetica, sans-serif;
	}
	.grey_example
	{
		text-align:center;
		color:white;
		margin-top:-400px;
	}
	#container {
	font-family:Tahoma, Helvetica, sans-serif;
	 width: 920px;
	 margin: auto;
	font-family: helvetica, arial;
	text-align:center;
	}

	table {
		background-color:white;
		font-family:Tahoma, Helvetica, sans-serif;
		width: 520px;
		margin-bottom: 10px;
		text-shadow:none;
		color:black;
	}

	td {
	 border-right: 1px solid #aaaaaa;
	 padding: 1em;
	 text-align:center;
	}

	td:last-child {
	 border-right: none;
	 
	}

	th {
	color:white;
	 text-align: left;
	 padding-left: 1em;
	 background: #cac9c9;
	border-bottom: 1px solid white;
	border-right: 1px solid #aaaaaa;
	text-align:center;
	height:30px
	}

	#pagination a, #pagination strong {
	 background: #e3e3e3;
	 padding: 4px 7px;
	 text-decoration: none;
	  text-shadow:none;
	border: 1px solid #cac9c9;
	color: #292929;
	font-size: 13px;
	
	}

	#pagination strong, #pagination a:hover {
	 font-weight: normal;
	 background: #cac9c9;
	 
	}
	.job_link
	{
		color:black;
	}
	.job_link:visited
	{
		color:black;
	}
	.j_box:hover
	{
		text-align:center;
		color:black;
		text-shadow:none;
		color:black;
		margin:auto;
		width: 880px;
		height:20px;
		padding: 20px;
		background: #f0f0f0;
		overflow:auto;

		-webkit-border-radius: 10px;
		-moz-border-radius: 10px;
		border-radius: 10px; 		
		
		/* -- CSS3 - create a background graident -- */
		background: -webkit-gradient(linear, 0% 0%, 0% 40%, from(#EEE), to(#FFFFFF)); 
		background: -moz-linear-gradient(0% 40% 90deg,#FFF, #EEE); 
		
		/* -- CSS3 - add a drop shadow -- */
		-webkit-box-shadow:0px 0 50px #ccc;
		-moz-box-shadow:0px 0 50px #ccc; 
		box-shadow:0px 0 50px #ccc;		
	}
	.j_box
	{
		text-align:center;
		color:black;
		text-shadow:none;
		color:black;
		margin:auto;
		width: 880px;
		height:20px;
		padding: 20px;
		background: #f0f0f0;
		overflow:auto;

		-webkit-border-radius: 10px;
		-moz-border-radius: 10px;
		border-radius: 10px; 		
		
		/* -- CSS3 - create a background graident -- */
		background: -webkit-gradient(linear, 0% 0%, 0% 40%, from(#EEE), to(#FFFFFF)); 
		background: -moz-linear-gradient(0% 40% 90deg,#FFF, #EEE); 
		
		/* -- CSS3 - add a drop shadow -- */
		-webkit-box-shadow:0px 0 50px #ccc;
		-moz-box-shadow:0px 0 50px #ccc; 
		box-shadow:0px 0 50px #ccc;		 		
	}
	</style>

</head>

<body id="body_id">

<section id="page"> <!-- Defining the #page section with the section tag -->
    
            <header> <!-- Defining the header section of the page with the appropriate tag -->
            
                <hgroup>
                    <h1>باب رزق</h1>
                    <h3>.. توكل على الله فهو الرزاق</h3>
                </hgroup>
                                
                <nav class="clear"> <!-- The nav link semantically marks your main site navigation -->
                    <ul>
						<li><a href="#article1">أضف فرصة جديدة</a></li>
						<li><a href="#article2">ابحث عن عمل</a></li>
						<li><a href="#article3">نتائج تناسب تاقاتك</a></li>
                        <li><a href="#article4">عدل تاقاتك</a></li>
						<li><a href="#article5">عدل معلوماتك</a></li>
						<li><a href="#article6">اخر الفرص المضافة</a></li>
                        <li title="<?php echo $this->session->userdata('username');?> سجل خروجك" style="cursor:pointer"><a onclick="goto('<?php echo base_url()?>index.php/acc_mgt_cont/logout')">سجل خروجك</a></li>
						
                    </ul>
                </nav>
            
            </header>
            
            <section id="articles"> <!-- A new section with the articles -->
				
				
				<br/><br/><br/>
				<!-- Article 6 start -->

                <div class="line"></div>
                <article id="article6" style="min-height:250px" class="article">
                    <h2>اخر الفرص المضافة</h2>
                    
                    <div class="line"></div>
					<div id="container_all">
						<div class="j_box" onclick="load_more()">اعرض جميع الفرص</div>
					 </div>
                </article>
                
				<!-- Article 6 end -->
				
				<!-- Article 1 start -->
                <div class="line"></div>  <!-- Dividing line -->
                <footer> <!-- Marking the footer section -->
					<a href="#" class="up" >اعلى الصفحة</a>
				</footer>
                <article id="article1" class="article" style="min-height:530px"> <!-- The new article tag. The id is supplied so it can be scrolled into view. -->
                    <h2>أضف فرصة جديدة</h2>
                    
                    <div class="line"></div>
                    
					<div style="position:relatve">
					<form method="post" action="<?php echo base_url()?>index.php/jobs_cont/add"> 
					
						
								
						<fieldset id="user-details">	
							
							<label for="title" >عنوان الوظيفة</label>
							<input type="text" name="title" value="" required/> 
						
							<label for="place" style="cursor:pointer" onclick="addMap()">الوصف , اضغط هنا لاضافة خريطة</label>
							
							<div id="map_holder" style="width:30px;height:30px;overflow:hidden;float:center;position:relative;right:50px;top:35px;margin-top:-20px"></div>
							<input style="display:none" id="place_map" type="text" name="place_map" value=""/>
							
							<input type="text" name="place" value=""  required/>
						
							<label for="req">المتطلبات</label> 
							<input type="text" name="req" value=""  required/> 
						
							<label for="duedate">اخر موعد للتقديم</label> 
							<input type="date" name="duedate" value=""  required/> 
							
							<label for="tags">تاقات</label> 
							<input type="text" name="tags" value=""  required/> 
						
						</fieldset><!--end user-details-->
						
						<fieldset id="user-message">
						
							<label for="desc">وصف الوظيفة</label> 
							<textarea name="desc" rows="0" cols="0" required></textarea> 
						
							<input type="submit" value="اضف الفرصة" name="submit" class="submit" />		
						
						</fieldset><!-- end user-message -->
						 
					</form>	
					</div>
 
                    
                </article>
                
				<!-- Article 1 end -->


				<!-- Article 2 start -->

                <div class="line"></div>
                <footer> <!-- Marking the footer section -->
					<a href="#" class="up" >اعلى الصفحة</a>
				</footer>
                <article id="article2" style="min-height:50px" class="article">					
					<input id="keyword" type="text" style="float:left;margin-top:4px;margin-bottom:0px; margin-left:400px;height:10px" onkeypress="searchKeyPress(event);" name="keyword" value="" required/>
					<label for="keyword" style="float:left;color:white;margin-top:10px; margin-left:10px;">كلمة البحث</label>
                    <h2>ابحث عن عمل</h2>
                    <div class="line" style=""></div>
					<div id="container_search">
					
					
					 </div>
                </article>
                
				<!-- Article 2 end -->
				
				<!-- Article 3 start -->

                <div class="line"></div>
                <footer> <!-- Marking the footer section -->
					<a href="#" class="up" >اعلى الصفحة</a>
				</footer>
                <article id="article3" style="min-height:50px" >
                    <h2>نتائج تناسب تاقاتك</h2>
                    
                    <div class="line"></div>
					<div id="container_match">
						<div class="j_box" onclick="load_more_matching()">اعرض جميع الفرص</div>
					</div>
                </article>
                
				<!-- Article 3 end -->
				
				<!-- Article 4 start -->

                <div class="line"></div>
                <footer> <!-- Marking the footer section -->
					<a href="#" class="up" >اعلى الصفحة</a>
				</footer>
                <article id="article4" style="min-height:250px" >
					<h2>عدل تاقاتك</h2>
                    
                    <div class="line"></div>
					<form method="post" action="<?php echo base_url()?>index.php/acc_mgt_cont/add_tags" style="height:100px;margin-bottom:10px">	
						<fieldset style="text-align:center">
							<label style="text-align:center" for="tags_user" >اضف تاق جديد (مثال : وزارة الداخلية ,الرياض , جدة , ثانوي)  لتساعدنا في البحث عن وظيفة مناسبة لك</label>
							<input style="width:800px;float:left;margin-top:10px;margin-bottom:-10px" type="text" name="tags_user" value="" required/> <br/> 
							<input style="text-align:center;float:center" type="submit" value="أضف التاق" name="submit" class="submit"/>		
						</fieldset><!--end user-details-->
					</form>
					<div id="tags_div">
						<div class="j_box" onclick="load_more_tags()" style="text-align:center;float:center">! لم تضبط تاقاتك بعد</div>
					</div>
                </article>
                
				<!-- Article 4 end -->
				<!-- Article 5 start -->

                <div class="line"></div>
                <footer> <!-- Marking the footer section -->
					<a href="#" class="up" >اعلى الصفحة</a>
				</footer>
                <article id="article5" class="article">
					<h2>عدل معلوماتك</h2>
                    
                    <div class="line"></div>
					<div style="position:relatve">
					<form method="post" action="<?php echo base_url()?>index.php/acc_mgt_cont/chang_pass" style="height:380px"> 
					
						
								
						<fieldset id="user-details">	
							
							<label for="password" >كلمة المرور القديمة</label>
							<input type="password" name="old_pass" value="" required/> 
							
							<label for="new_pass" >كلمة المرور الجديدة</label>
							<input type="password" name="new_pass" value="" required/> 
						
							<label for="re_pass">اعد كتابة كلمة مرورك الجديدة</label> 
							<input type="password" name="re_new_pass" value=""  required/> 
							
							<input type="submit" value="عدل كلمة المرور" name="submit" class="submit" style="float:right"/>		
						</fieldset><!--end user-details-->
							
						
						
						 
					</form>	
					</div>
                </article>
                
				<!-- Article 5 end -->
				

            </section>

        <footer> <!-- Marking the footer section -->

           <div class="line"></div>
           
           <p style="color:green">جميع الحقوق محفوظة - موقع باب رزق</p> <!-- Change the copyright notice -->
           
           <a href="#" class="up">اعلى الصفحة</a>
           <a href="https://www.facebook.com/swe966" class="by">تصميم سالم الزهراني</a>
           

        </footer>
            
		</section> <!-- Closing the #page section -->
        <!--map-->
<div id="map_dialog" title="Map Component">
	<p id="validation_cut" class="validateTips"></p>
    <table>
	<tr>
	<td style="text-align:center">
		<div id="mapDiv" style="width:300px;height:300px;"></div>
		<br/><b>أدخل اسم المدينة</b><br/><input id="gmap_address" type="text" class="inputs" onchange="getAddress()" />
		<br/><input type="button" value="حدث الخريطة" onclick="loadScript()" style="font-family:Tahoma, Helvetica, sans-serif;lborder:0;width:100px;height:40px;text-align:center" />
			<input type="button" value="أضف الخريطة" onclick="addmaptocontex()" style="font-family:Tahoma, Helvetica, sans-serif;border:0;width:100px;height:40px;text-align:center" />
			
	</td>
	<tr><td style="display:block"><b>Zoom</b><br/><select id="gmap_zoom"  ><option value="1">1 (Far)</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8" >8</option><option value="9">9</option><option value="10">10</option><option value="11" selected="selected">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15" >15</option><option value="16">16</option><option value="17">17 (Close)</option></select></td></tr>
	<td style="display:none">
	<table style="font-family:Tahoma, Helvetica, sans-serif;display:none">
		<tr>
		<td style="width=250px"></td></tr>
		<tr><td style="display:none"><b>Width</b><br/><input id="gmap_width" style="display:none" type="text" class="inputs" value="330" /></td></tr>
		<tr><td style="display:none"><b>Height</b><br/><input id="gmap_height" style="display:none" type="text" class="inputs" value="300" /></td></tr>
		

		<tr><td style="display:none"><input style="display:none" id="gmap_overview" type="checkbox"  /><b>Show Overview</b></td></tr>
		<tr><td style="display:none"><input style="display:none" id="gmap_scale" type="checkbox"  /><b>Show Scale</b></td></tr>
		<tr><td style="display:none"><input style="display:none" id="gmap_marker" type="checkbox"  /><b>Show Marker</b></td></tr>
		<tr><td style="display:none"><b>Longitude</b><br/><input id="gmap_lng" type="text" value="50.107" /></td></tr>
		<tr><td style="display:none"><b>Latitude</b><br/><input id="gmap_lat" type="text" value="26.376" /></td></tr>
		<tr><td style="width=25px;font-family:Tahoma, Helvetica, sans-serif;"  align="center"></td></tr>
	</table>
	</td>
	</tr>

	</table>

</div>

        <!-- JavaScript Includes -->
        
        
        <script src="<?php echo base_url()?>external_folder/js/jquery.scrollTo-1.4.2/jquery.scrollTo-min.js"></script>
        <script src="<?php echo base_url()?>external_folder/js/script.js"></script>
</body>
<script type="text/javascript">
		//document.getElementById("body_id").style.background = "url(<?php echo base_url()?>external_folder/img/slide2.jpg) no-repeat center center fixed";
        //document.getElementById("body_id").style.backgroundSize ='cover';
		var data_rec_search=new Array();
		function searchKeyPress(e)
		{
			if (window.event) { e = window.event; }
			if (e.keyCode == 13)
			{
				var url='<?php echo base_url()?>index.php/acc_mgt_cont/search_job/';
				$.post(url, {keyword:document.getElementById('keyword').value},function(data) {
					var data_rec_search=eval('(' + data + ')');
					var jobs_str='';
					for(var i=0;i<data_rec_search.length;i++)
					{	
						jobs_str+='<div class="j_box"><a class="job_link" href=<?php echo base_url()?>index.php/jobs_cont/view_job/'+data_rec_search[i].j_id+'>'+data_rec_search[i].j_title+'</a></div>';
						jobs_str+='<br/>';
					}
					if(data_rec_search==0)
						jobs_str+='<div class="j_box"> لم تدخل كلمة صحيحة او لا يوجد نتائج</div>';
					document.getElementById('container_search').innerHTML=jobs_str;
				});
			}
			//<div class="j_box" onclick="load_more()"> جميع الفرص النتائج</div>
		}
		$(document).ready(function() {
			
			var rec=<?php echo $records ?>;
			var m_j=<?php echo $matching_jobs ?>;
			var u_t='<?php echo $user_tags ?>';
			var data_rec=eval('(' + rec + ')');
			var m_j_rec=eval('(' + m_j + ')');
			var u_t_rec=eval('(' + u_t + ')');
			var jobs_str='';
			var max=5;
			for(var i=0;i<max;i++)
			{	
				if(i<data_rec.length)
				{
					jobs_str+='<div class="j_box"><a class="job_link" href=<?php echo base_url()?>index.php/jobs_cont/view_job/'+data_rec[i].j_id+'>'+data_rec[i].j_title+'</a></div>';
					jobs_str+='<br/>';
				}
			}
			
			var mj_str='';
			for(var i=0;i<max;i++)
			{
				if(i<m_j_rec.length)
				{
					mj_str+='<div class="j_box"><a class="job_link" href=<?php echo base_url()?>index.php/jobs_cont/view_job/'+m_j_rec[i].j_id+'>'+m_j_rec[i].j_title+'</a></div>';
					mj_str+='<br/>';
				}
			}
			temp_cont_job=document.getElementById('container_all').innerHTML;
			document.getElementById('container_all').innerHTML=jobs_str+temp_cont_job;
			temp_cont_match=document.getElementById('container_match').innerHTML;
			document.getElementById('container_match').innerHTML=mj_str+temp_cont_match;
			
			var u_t_str='';
			for(var i=0;i<max;i++)
			{
				if(i<u_t_rec.length)
				{
					var array_tag_id=u_t_rec[i].split('###');
					u_t_str+='<div class="j_box"><img src="<?php echo base_url()?>external_folder/img/x.png" onclick="del_tag('+array_tag_id[1]+')" style="height:20px;float:right;margin:auto"/>'+array_tag_id[0]+'</div>';
					u_t_str+='<br/>';
				}
			}
			temp_tags='<div class="j_box" onclick="load_more_tags()">اضغط لعرض جميع تاقاتك</div>';
			document.getElementById('tags_div').innerHTML=u_t_str+temp_tags;
			
			
		});
		function load_more()
		{
			
			var rec=<?php echo $records ?>;
			var data_rec=eval('(' + rec + ')');
			var jobs_str='';
			for(var i=0;i<data_rec.length;i++)
			{	
				jobs_str+='<div class="j_box"><a class="job_link" href=<?php echo base_url()?>index.php/jobs_cont/view_job/'+data_rec[i].j_id+'>'+data_rec[i].j_title+'</a></div>';
				jobs_str+='<br/>';
			}
			document.getElementById('container_all').innerHTML=jobs_str;
		
			
			
		}
		function load_more_matching()
		{
			var m_j=<?php echo $matching_jobs ?>;
			var m_j_rec=eval('(' + m_j + ')');
			var mj_str='';
			for(var i=0;i<m_j_rec.length;i++)
			{
				if(i<m_j_rec.length)
				{
					mj_str+='<div class="j_box"><a class="job_link" href=<?php echo base_url()?>index.php/jobs_cont/view_job/'+m_j_rec[i].j_id+'>'+m_j_rec[i].j_title+'</a></div>';
					mj_str+='<br/>';
				}
			}
			if(m_j_rec.length!=0)
				document.getElementById('container_match').innerHTML=mj_str;
			else
				document.getElementById('container_match').innerHTML='<div class="j_box" onclick="load_more_matching()">! لايوجد حاليا فرص مناسبة لك</div>';
		}
		
		function load_more_search()
		{
			var jobs_str='';
			for(var i=0;i<data_rec_search.length;i++)
			{	
				jobs_str+='<div class="j_box"><a class="job_link" href=<?php echo base_url()?>index.php/jobs_cont/view_job/'+data_rec_search[i].j_id+'>'+data_rec_search[i].j_title+'</a></div>';
				jobs_str+='<br/>';
			}
			document.getElementById('container_search').innerHTML=jobs_str;
		}
		function load_more_tags()
		{
			var u_t='<?php echo $user_tags ?>';
			var u_t_rec=eval('(' + u_t + ')');
			var u_t_str='';
			for(var i=0;i<u_t_rec.length;i++)
			{
				var array_tag_id=u_t_rec[i].split('###');
				u_t_str+='<div class="j_box"><img src="<?php echo base_url()?>external_folder/img/x.png" onclick="del_tag('+array_tag_id[1]+')" style="height:20px;float:right;margin:auto"/>'+array_tag_id[0]+'</div>';
				u_t_str+='<br/>';
			}
			if(u_t_rec.length!=0)
				document.getElementById('tags_div').innerHTML=u_t_str;
			else
				document.getElementById('tags_div').innerHTML='<div class="j_box" onclick="load_more_tags()">! لم تضبط تاقاتك بعد</div>';
		}
		function del_tag(id)
		{
			var form = document.createElement("form");
			form.setAttribute("method", 'post');
			form.setAttribute("action", "<?php echo base_url()?>index.php/acc_mgt_cont/del_tag/"+id+"");
			document.body.appendChild(form);
			form.submit();
		}
		$(function() {
		// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
		$( "#dialog:ui-dialog" ).dialog( "destroy" );

		//var sitId = $( "#sit_Id" ),
		//	allFields = $( [] ).add(sitId ),
		//	tips = $( ".validateTips" );

		function updateTips( t ) {
			tips
				.text( t )
				.addClass( "ui-state-highlight" );
			setTimeout(function() {
				tips.removeClass( "ui-state-highlight", 1500 );
			}, 500 );
		}

		function checkLength( o, n, min, max ) {
			if ( o.val().length > max || o.val().length < min ) {
				o.addClass( "ui-state-error" );
				updateTips( "Length of " + n + " must be between " +
					min + " and " + max + "." );
				return false;
			} else {
				return true;
			}
		}

		function checkRegexp( o, regexp, n ) {
			if ( !( regexp.test( o.val() ) ) ) {
				o.addClass( "ui-state-error" );
				updateTips( n );
				return false;
			} else {
				return true;
			}
		}

		$( "#map_dialog" ).dialog({
			autoOpen: false,
			height: 590,
			width: 550,
			dialogClass: 'dialog_class',
			modal: true,
			close: function() {
			}
		});


	});
</script>
</html>
